package cn.edu.hznu.ocw.actions;

import java.io.File;

import org.apache.struts2.ServletActionContext;

public class DownloadAction extends OCWAction {
	private static final long serialVersionUID = 5655293270758749708L;
	private String courseType;
	private String subType;
	private String lecturer;
	private String courseName;
	private String sectionName;

	@Override
	public String execute() throws Exception {
		StringBuilder realPath = new StringBuilder(ServletActionContext
				.getServletContext().getRealPath("/"));
		realPath.append("_Courses\\").append(courseType).append("\\").append(
				subType).append("\\").append(lecturer).append("\\").append(
				courseName).append("\\").append(sectionName);
		File folder = new File(realPath.toString());

		return null;
	}

	public void setCourseType(String courseType) {
		this.courseType = courseType;
	}

	public void setSubType(String subType) {
		this.subType = subType;
	}

	public void setLecturer(String lecturer) {
		this.lecturer = lecturer;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public void setSectionName(String sectionName) {
		this.sectionName = sectionName;
	}

}
